<template>
	<view>
		<view  class="con_box" v-for="(i,n) in  Datalist" :key="n">
			<view class="con_tixt">{{i.title}}</view>
			<view class="con_xiang">{{i.content}}</view>
		</view>
		
	</view>
</template>

<script>
	import {getInfoList} from '@/api/merchat.js'
	export default {
		data() {
			return {
				page:1,
				lastPage:0,
				Datalist:[],
				statusText:""
			};
		},
		onLoad() {
				this.getData()
		},
		onReachBottom:function(){
				this.page++
				if(this.page>this.lastPage){
					return
				}
				this.getData()
		},
		methods:{
			getData(){
					
				getInfoList({page:this.page,limit:10}).then(res=>{
					console.log(res)
					this.lastPage = res.data.last_page
						this.statusText = res.data.last_page==this.page?"暂无更多数据":"上拉加载"
					this.Datalist =[...this.Datalist,...res.data.data] 
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.con_box{
	width: 750rpx;
	height: 190rpx;
	background: #FFFFFF;
	border-bottom:1px solid #E7E7E7;
	padding: 30rpx;
	margin-bottom: 12px;
}
.con_tixt{
	font-size: 15px;
	font-family: PingFangSC-Medium, PingFang SC;
	font-weight: 500;
	color: #222222;
	margin-bottom: 8px;
}
.con_xiang{
	font-size: 13px;
	font-family: PingFangSC-Regular, PingFang SC;
	font-weight: 400;
	color: #999999;
}
</style>
